package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.FyProjectApplyAncillary;
import com.ruoyi.system.mapper.FyProjectApplyAncillaryMapper;
import com.ruoyi.system.service.IFyProjectApplyAncillaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 剧本梗概备案申请附件Service业务层处理
 *
 * @author ruoyi
 * @date 2024-02-28
 */
@Service
public class fyProjectApplyAncillaryServiceImpl extends ServiceImpl<FyProjectApplyAncillaryMapper, FyProjectApplyAncillary> implements IFyProjectApplyAncillaryService
{
    @Autowired
    private FyProjectApplyAncillaryMapper fyProjectApplyAncillaryMapper;

    /**
     * 查询剧本梗概备案申请附件
     *
     * @param wcPatentApplicationId 剧本梗概备案申请附件主键
     * @return 剧本梗概备案申请附件
     */
    @Override
    public FyProjectApplyAncillary selectFyProjectApplyAncillaryByWcPatentApplicationId(Long wcPatentApplicationId)
    {
        return fyProjectApplyAncillaryMapper.selectFyProjectApplyAncillaryByFyProjectApplyId(wcPatentApplicationId);
    }

    /**
     * 查询剧本梗概备案申请附件列表
     *
     * @param fyProjectApplyAncillary 剧本梗概备案申请附件
     * @return 剧本梗概备案申请附件
     */
    @Override
    public List<FyProjectApplyAncillary> selectFyProjectApplyAncillaryList(FyProjectApplyAncillary fyProjectApplyAncillary)
    {
        return fyProjectApplyAncillaryMapper.selectFyProjectApplyAncillaryList(fyProjectApplyAncillary);
    }

    /**
     * 新增剧本梗概备案申请附件
     *
     * @param fyProjectApplyAncillary 剧本梗概备案申请附件
     * @return 结果
     */
    @Override
    public int insertFyProjectApplyAncillary(FyProjectApplyAncillary fyProjectApplyAncillary)
    {
        return fyProjectApplyAncillaryMapper.insertFyProjectApplyAncillary(fyProjectApplyAncillary);
    }

    /**
     * 修改剧本梗概备案申请附件
     *
     * @param fyProjectApplyAncillary 剧本梗概备案申请附件
     * @return 结果
     */
    @Override
    public int updateFyProjectApplyAncillary(FyProjectApplyAncillary fyProjectApplyAncillary)
    {
        return fyProjectApplyAncillaryMapper.updateFyProjectApplyAncillary(fyProjectApplyAncillary);
    }

    /**
     * 批量删除剧本梗概备案申请附件
     *
     * @param wcPatentApplicationIds 需要删除的剧本梗概备案申请附件主键
     * @return 结果
     */
    @Override
    public int deleteFyProjectApplyAncillaryByWcPatentApplicationIds(String wcPatentApplicationIds)
    {
        return fyProjectApplyAncillaryMapper.deleteFyProjectApplyAncillaryByFyProjectApplyIds(Convert.toStrArray(wcPatentApplicationIds));
    }

    /**
     * 删除剧本梗概备案申请附件信息
     *
     * @param wcPatentApplicationId 剧本梗概备案申请附件主键
     * @return 结果
     */
    @Override
    public int deleteFyProjectApplyAncillaryByWcPatentApplicationId(Long wcPatentApplicationId)
    {
        return fyProjectApplyAncillaryMapper.deleteFyProjectApplyAncillaryByFyProjectApplyId(wcPatentApplicationId);
    }
}
